import { defineStore } from "pinia";
import { store } from "@/store/store";
import type { Menu } from "@/components/ReMenu/menu";

export const menuStore = defineStore("menu", {
  state: (): { menu: Menu } => ({
    menu: {}
  }),
  getters: {
    getMenu(state) {
      return state;
    }
  },
  actions: {
    CHANGE_MENU(menu: Menu) {
      this.menu = menu;
    }
  }
});

export function menuStoreHook() {
  return menuStore(store);
}
